package com.mingqijia.gassafety.authority.api.req.department;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.List;

/**
 * 更新数据请求
 * @author Damon S.
 * @version v0.2
 * @date 2021-06-19
 */
@Data
@ApiModel(value = "更新组织请求")
public class UpdateDepartmentReqDTO implements Serializable {

    @NotNull(message = "组织ID不能为空")
    @ApiModelProperty(value = "组织ID", required = true)
    @Pattern(regexp = "^[\\da-zA-Z]{1,32}$", message = "组织ID格式不合法")
    private String id;

    @ApiModelProperty(value = "组织名称", required = true)
    @Pattern(regexp = "^[\\w\\u4e00-\\u9fa5]{2,16}$", message = "组织名称应满足2-16位汉字、字母、数字、下划线")
    private String name;

    @ApiModelProperty(value = "父级组织")
    private List<String> parentId;

    @ApiModelProperty(value = "组织类型[字典取值]", required = true)
    private String type;

    @ApiModelProperty(value = "显示顺序", required = true)
    private Integer ordinal;
}
